package bean;

import javax.servlet.http.HttpServletRequest;

public class Request {
    HttpServletRequest request;
    public Request(HttpServletRequest request) {
        this.request = request;
    }

    public String getRoot() {
        return request.getContextPath() + "/";
    }

    public void setAttr(String key, Object val) {
        request.setAttribute(key, val);
    }

    public Object getAttr(String key) {
        return request.getAttribute(key);
    }

    /**
     * @return the request
     */
    public HttpServletRequest getRequest() {
        return request;
    }

    /**
     * @param request the request to set
     */
    public void setRequest(HttpServletRequest request) {
        this.request = request;
    }
}
